import request from '@/utils/request'

const api_name = '/admin/userrolerelation/'

export default {
    //根据用户id查询用户已分配的角色
    getRelation(userId) {
        return request({
        url: `${api_name}/relations`,
        method: 'get',
        params: userId
        })
    },
    //分配角色
    assignRoles(assginRoleVo) {
        return request({
        url: `${api_name}/setrole`,
        method: 'post',
        data: assginRoleVo
        })
    }
}